package hoodoos.rule.core;

import hoodoos.rule.api.RequestContext;
import java.util.HashMap;
import java.util.Map;

public class DefaultRequestContext implements RequestContext {

  Map<String, Object> requestData = new HashMap<>();

  public Integer getIntRequestParameter(String requestParameterName) {
    return (Integer) requestData.get(requestParameterName);
  }

  public String getStrRequestParameter(String requestParameterName) {
    return (String) requestData.get(requestParameterName);
  }

  public void setIntRequestParameter(String requestParameterName, Integer value) {
    requestData.put(requestParameterName, value);
  }

  public void setStrRequestParameter(String requestParameterName, String value) {
    requestData.put(requestParameterName, value);
  }
}
